<template>
  <div class="not-found-container">
    <el-card class="not-found-card">
      <div class="not-found-content">
        <el-icon class="not-found-icon">
          <Warning />
        </el-icon>
        <h1 class="not-found-title">404</h1>
        <p class="not-found-text">抱歉，您访问的页面不存在</p>
        <div class="not-found-actions">
          <el-button type="primary" @click="goHome" size="large">
            <el-icon><House /></el-icon>
            返回首页
          </el-button>
          <el-button @click="goBack" size="large">
            <el-icon><ArrowLeft /></el-icon>
            返回上一页
          </el-button>
        </div>
      </div>
    </el-card>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { Warning, House, ArrowLeft } from '@element-plus/icons-vue'

const router = useRouter()

const goHome = () => {
  router.push('/')
}

const goBack = () => {
  router.go(-1)
}
</script>

<style scoped lang="less">
.not-found-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f7fa;
  
  .not-found-card {
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    
    .not-found-content {
      padding: 20px;
      
      .not-found-icon {
        font-size: 64px;
        color: #f56c6c;
        margin-bottom: 20px;
      }
      
      .not-found-title {
        font-size: 72px;
        margin: 0;
        color: #333;
        font-weight: bold;
      }
      
      .not-found-text {
        font-size: 18px;
        color: #666;
        margin: 20px 0;
      }
      
      .not-found-actions {
        margin-top: 30px;
        
        .el-button {
          margin: 0 10px;
        }
      }
    }
  }
}
</style>